-
Couldn't load subscription status.
- Fork 24.9k
fix: fix the potential race condition when dismissing and presentating modal #35705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix the potential race condition when dismissing and presentating modal #35705
Conversation
Base commit: 9669c10 |
a11da0f to
4414f1e
Compare
Base commit: 9669c10 |
|
PR build artifact for 4414f1e is ready. |
|
@makovkastar has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@makovkastar merged this pull request in e948c79. |
…g modal (#35705) Summary: `react-native-screens` has a bug about `UIViewControllerHierarchyInconsistency` when dismissing a `react-native` `<Modal>`. Here is the bug software-mansion/react-native-screens#944 After adding `dispatch_async` block, it solves the issue. But I do not know if this is right. Here is the example repo https://github.com/wood1986/react-native-modal-crash You can revert my last commit wood1986/react-native-modal-crash@86e7bc1 to reproduce the issue ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - fixed the potential race condition when dismissing and presentating modal Pull Request resolved: #35705 Reviewed By: cipolleschi Differential Revision: D42253488 Pulled By: makovkastar fbshipit-source-id: 3e98fa9e719ecdeddeb2a367b0cd364e15136d56
…g modal (#35705) Summary: `react-native-screens` has a bug about `UIViewControllerHierarchyInconsistency` when dismissing a `react-native` `<Modal>`. Here is the bug software-mansion/react-native-screens#944 After adding `dispatch_async` block, it solves the issue. But I do not know if this is right. Here is the example repo https://github.com/wood1986/react-native-modal-crash You can revert my last commit wood1986/react-native-modal-crash@86e7bc1 to reproduce the issue ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - fixed the potential race condition when dismissing and presentating modal Pull Request resolved: #35705 Reviewed By: cipolleschi Differential Revision: D42253488 Pulled By: makovkastar fbshipit-source-id: 3e98fa9e719ecdeddeb2a367b0cd364e15136d56
…g modal (facebook#35705) Summary: `react-native-screens` has a bug about `UIViewControllerHierarchyInconsistency` when dismissing a `react-native` `<Modal>`. Here is the bug software-mansion/react-native-screens#944 After adding `dispatch_async` block, it solves the issue. But I do not know if this is right. Here is the example repo https://github.com/wood1986/react-native-modal-crash You can revert my last commit wood1986/react-native-modal-crash@86e7bc1 to reproduce the issue ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - fixed the potential race condition when dismissing and presentating modal Pull Request resolved: facebook#35705 Reviewed By: cipolleschi Differential Revision: D42253488 Pulled By: makovkastar fbshipit-source-id: 3e98fa9e719ecdeddeb2a367b0cd364e15136d56
Summary
react-native-screenshas a bug aboutUIViewControllerHierarchyInconsistencywhen dismissing areact-native<Modal>. Here is the bug software-mansion/react-native-screens#944After adding
dispatch_asyncblock, it solves the issue. But I do not know if this is the right fix.Here is the example repo https://github.com/wood1986/react-native-modal-crash.
You can revert my last commit wood1986/react-native-modal-crash@86e7bc1 to reproduce the issue. (after revert or hard reset, you need to rerun
git clean -xfdqandyarn install)Changelog
[IOS] [FIXED] - fixed the potential race condition when dismissing and presentating modal
Test Plan